package com.zyn.rsgl.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("salary_adjustment")
public class SalaryAdjustment {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    /**
     * 员工ID
     */
    @TableField("user_id")
    private String userId;

    /**
     * 调薪前基本工资
     */
    @TableField("previous_base_salary")
    private Double previousBaseSalary;

    /**
     * 调薪后基本工资
     */
    @TableField("new_base_salary")
    private Double newBaseSalary;

    /**
     * 调薪原因
     */
    @TableField("reason")
    private String reason;

    /**
     * 调薪日期
     */
    @TableField("adjustment_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime adjustmentDate;

    /**
     * 创建时间
     */
    @TableField("created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField("updated_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;
}